package router

import (
	"{{.ProjectName}}/internal/controller"
	greeterPb "{{.ProjectName}}/pb"

	"gitee.com/wu-jin-feng/fgin"
	"github.com/gin-gonic/gin"
	"google.golang.org/grpc"
)

type GreeterRouter struct {
	F          *fgin.Fgin
	GrpcServer *grpc.Server
	Router     *gin.Engine
	GreeterCtr *controller.GreeterController
}

func (r *GreeterRouter) InitRouter() {
	greeterPb.RegisterGreeterServiceServer(r.GrpcServer, r.GreeterCtr.GreeterSvc)
	g := r.Router.Group("greeter")
	g.GET("/get_scheme", r.GreeterCtr.GetScheme)
}
